type Length<T extends readonly any[]> = T["length"];

type TestType<T extends any[]> = T["length"];
type strArr = string[];
type TupleArr = [string, number];

type T1 = TestType<strArr>; // number  strArr 类型中可以有很多个元素
type T2 = TestType<TupleArr>; // 2   TupleArr 类型 只有2个
